package com.vasthu.gui;

import com.vasthu.gui.VstTableItemSelectable;

public class VstTableItem implements VstTableItemSelectable {

	/* fields that will be shown in item selection table for a Bill*/
	private long stockId;
	private String itemCode;
	private String itemName;
	private String itemCategoryName;
	private float quantity;
    private float unitPrice;
	private float discount;
	private float tax;
	
	public long getStockId() {
		return stockId;
	}
	
	public void setStockId(long stockId) {
		this.stockId = stockId;
	}
	
	public String getItemCode() {
		return itemCode;
	}
	
	public void setItemCode(String itemCode) {
		this.itemCode = itemCode;
	}
	
	public String getItemName() {
		return itemName;
	}
	
	public void setItemName(String itemName) {
		this.itemName = itemName;
	}
	
	public String getItemCategoryName() {
		return itemCategoryName;
	}
	
	public void setItemCategoryName(String itemCategoryName) {
		this.itemCategoryName = itemCategoryName;
	}
	
	public float getQuentity() {
		return quantity;
	}
	
	public void setQuentity(float quantity) {
		this.quantity = quantity;
	}
	
	public float getUnitPrice() {
		return unitPrice;
	}
	
	public void setUnitPrice(float unitPrice) {
		this.unitPrice = unitPrice;
	}
	
	public float getDiscount() {
		return 3.5f;
	}
	
	public void setDiscount(float discount) {
		this.discount = discount;
	}
	
	public float getTax() {
		return 1.7f;
	}
	
	public void setTax(float tax) {
		this.tax = tax;
	}
	
	@Override
    public Object getValue(int col) {
        switch (col) {
            case 0:
                return getItemCode();
            case 1:
                return getItemName();
            case 2:
                return getItemCategoryName();
            case 3:
                return getQuentity();
            case 4:
                return getUnitPrice();
			case 5:
                return getDiscount();
            case 6:
                return getTax();
			case 7:
				return 0.0f;
            default:
                return new String("");
        }
    }

}